<!DOCTYPE html>
<html lang="en">
  <head>
    <title>LYMutableAttributedStringConvenience Protocol Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
    <script src="../js/lunr.min.js" defer></script>
    <script src="../js/typeahead.jquery.js" defer></script>
    <script src="../js/jazzy.search.js" defer></script>
  </head>
  <body>
    <a name="//apple_ref/swift/Protocol/LYMutableAttributedStringConvenience" class="dashAnchor"></a>
    <a title="LYMutableAttributedStringConvenience Protocol Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html">LYConvenienceKitTest 1.0.0 Docs</a> (75% documented)</p>
        <div class="header-right">
          <form role="search" action="../search.json">
            <input type="text" placeholder="Search documentation" data-typeahead>
          </form>
        </div>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html">LYConvenienceKitTest Reference</a>
        <img id="carat" src="../img/carat.png" alt=""/>
        LYMutableAttributedStringConvenience Protocol Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Extensions.html#/c:objc(cs)NSBundle">Bundle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Date.html">Date</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Dictionary.html">Dictionary</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/Double.html">Double</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions.html#/c:objc(cs)NSMutableAttributedString">NSMutableAttributedString</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/String.html">String</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions.html#/c:objc(cs)UICollectionViewFlowLayout">UICollectionViewFlowLayout</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIColor.html">UIColor</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIColor/LYColorStyle.html">– LYColorStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIColor/LYGradientColorDirection.html">– LYGradientColorDirection</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions.html#/c:objc(cs)UIImage">UIImage</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIView.html">UIView</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Functions.html">Functions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Functions.html#/s:20LYConvenienceKitTest8LYAppLog_8fileName06methodG010lineNumberyx_S2SSitlF">LYAppLog(_:fileName:methodName:lineNumber:)</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Protocols/LYBundleConvenience.html">LYBundleConvenience</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/LYCollectionViewFlowLayoutConvenience.html">LYCollectionViewFlowLayoutConvenience</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/LYImageConvenience.html">LYImageConvenience</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/LYMutableAttributedStringConvenience.html">LYMutableAttributedStringConvenience</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/LYViewConvenience.html">LYViewConvenience</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Structs.html">Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Structs/LYDateConvenienceFunc.html">LYDateConvenienceFunc</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LYDictionaryConvenienceFunc.html">LYDictionaryConvenienceFunc</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LYDoubleConvenienceFunc.html">LYDoubleConvenienceFunc</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LYMixtureAttribute.html">LYMixtureAttribute</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LYScreenSize.html">LYScreenSize</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LYStringConvenienceFunc.html">LYStringConvenienceFunc</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LYViewConvenienceFunc.html">LYViewConvenienceFunc</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LYViewConvenienceFunc/LYUIBorderSideType.html">– LYUIBorderSideType</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>LYMutableAttributedStringConvenience</h1>
              <div class="declaration">
                <div class="language">
                  
                  <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">LYMutableAttributedStringConvenience</span></code></pre>

                </div>
              </div>
            <p>Undocumented</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <div class="task-name-container">
                <a name="/Available%20where%20%60Self%60%3A%20%60NSMutableAttributedString%60"></a>
                <a name="//apple_ref/swift/Section/Available where `Self`: `NSMutableAttributedString`" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/Available%20where%20%60Self%60%3A%20%60NSMutableAttributedString%60"></a>
                  <h3 class="section-name"><span>Available where <code>Self</code>: <code>NSMutableAttributedString</code></span>
</h3>
                </div>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:20LYConvenienceKitTest36LYMutableAttributedStringConveniencePAASo09NSMutableeF0CRbzrlE015mixtureAttributF0yxAA18LYMixtureAttributeVF"></a>
                    <a name="//apple_ref/swift/Method/mixtureAttributString(_:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:20LYConvenienceKitTest36LYMutableAttributedStringConveniencePAASo09NSMutableeF0CRbzrlE015mixtureAttributF0yxAA18LYMixtureAttributeVF">mixtureAttributString(_:<wbr>)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>设置属性文本</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@discardableResult</span>
<span class="kd">public</span> <span class="kd">func</span> <span class="nf">mixtureAttributString</span><span class="p">(</span><span class="n">_</span> <span class="nv">mixtureAttribute</span><span class="p">:</span> <span class="kt"><a href="../Structs/LYMixtureAttribute.html">LYMixtureAttribute</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:20LYConvenienceKitTest36LYMutableAttributedStringConveniencePAASo09NSMutableeF0CRbzrlE15changeLineSpaceyx12CoreGraphics7CGFloatVF"></a>
                    <a name="//apple_ref/swift/Method/changeLineSpace(_:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:20LYConvenienceKitTest36LYMutableAttributedStringConveniencePAASo09NSMutableeF0CRbzrlE15changeLineSpaceyx12CoreGraphics7CGFloatVF">changeLineSpace(_:<wbr>)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>修改行距</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@discardableResult</span>
<span class="kd">public</span> <span class="kd">func</span> <span class="nf">changeLineSpace</span><span class="p">(</span><span class="n">_</span> <span class="nv">lineSpacing</span><span class="p">:</span> <span class="kt">CGFloat</span> <span class="o">=</span> <span class="mi">8</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:20LYConvenienceKitTest36LYMutableAttributedStringConveniencePAASo09NSMutableeF0CRbzrlE12addUnderlineyxSo7UIColorC_So16NSUnderlineStyleVtF"></a>
                    <a name="//apple_ref/swift/Method/addUnderline(_:_:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:20LYConvenienceKitTest36LYMutableAttributedStringConveniencePAASo09NSMutableeF0CRbzrlE12addUnderlineyxSo7UIColorC_So16NSUnderlineStyleVtF">addUnderline(_:<wbr>_:<wbr>)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>添加下滑线</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@discardableResult</span>
<span class="kd">public</span> <span class="kd">func</span> <span class="nf">addUnderline</span><span class="p">(</span><span class="n">_</span> <span class="nv">lineColor</span><span class="p">:</span> <span class="kt">UIColor</span> <span class="o">=</span> <span class="o">.</span><span class="n">black</span><span class="p">,</span> <span class="n">_</span> <span class="nv">lineStyle</span><span class="p">:</span> <span class="kt">NSUnderlineStyle</span> <span class="o">=</span> <span class="kt">NSUnderlineStyle</span><span class="o">.</span><span class="n">single</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:20LYConvenienceKitTest36LYMutableAttributedStringConveniencePAASo09NSMutableeF0CRbzrlE16addStrikethroughyxSo7UIColorCF"></a>
                    <a name="//apple_ref/swift/Method/addStrikethrough(_:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:20LYConvenienceKitTest36LYMutableAttributedStringConveniencePAASo09NSMutableeF0CRbzrlE16addStrikethroughyxSo7UIColorCF">addStrikethrough(_:<wbr>)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>添加删除线</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@discardableResult</span>
<span class="kd">public</span> <span class="kd">func</span> <span class="nf">addStrikethrough</span><span class="p">(</span><span class="n">_</span> <span class="nv">strikethroughColor</span><span class="p">:</span> <span class="kt">UIColor</span> <span class="o">=</span> <span class="o">.</span><span class="n">black</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:20LYConvenienceKitTest36LYMutableAttributedStringConveniencePAASo09NSMutableeF0CRbzrlE8addImage_6bounds8positionxSo7UIImageC_So6CGRectVSiSgtF"></a>
                    <a name="//apple_ref/swift/Method/addImage(_:bounds:position:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:20LYConvenienceKitTest36LYMutableAttributedStringConveniencePAASo09NSMutableeF0CRbzrlE8addImage_6bounds8positionxSo7UIImageC_So6CGRectVSiSgtF">addImage(_:<wbr>bounds:<wbr>position:<wbr>)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>添加图片(默认添加到最后，position添加到具体位置)</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@discardableResult</span>
<span class="kd">public</span> <span class="kd">func</span> <span class="nf">addImage</span><span class="p">(</span><span class="n">_</span> <span class="nv">image</span><span class="p">:</span> <span class="kt">UIImage</span><span class="p">,</span> <span class="nv">bounds</span><span class="p">:</span> <span class="kt">CGRect</span><span class="p">,</span> <span class="nv">position</span><span class="p">:</span> <span class="kt">Int</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
            <div class="task-group">
              <div class="task-name-container">
                <a name="/%E5%AD%97%E7%AC%A6%E4%B8%B2%E4%B8%AD%E6%9F%A5%E6%89%BE%E7%BB%99%E5%AE%9A%E5%AD%90%E4%B8%B2%E5%B9%B6%E6%A0%87%E8%AE%B0"></a>
                <a name="//apple_ref/swift/Section/字符串中查找给定子串并标记" class="dashAnchor"></a>
                <div class="section-name-container">
                  <a class="section-name-link" href="#/%E5%AD%97%E7%AC%A6%E4%B8%B2%E4%B8%AD%E6%9F%A5%E6%89%BE%E7%BB%99%E5%AE%9A%E5%AD%90%E4%B8%B2%E5%B9%B6%E6%A0%87%E8%AE%B0"></a>
                  <h3 class="section-name"><span>字符串中查找给定子串并标记</span>
</h3>
                </div>
              </div>
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:20LYConvenienceKitTest36LYMutableAttributedStringConveniencePAASo09NSMutableeF0CRbzrlE06markerF2OfyxAA18LYMixtureAttributeVF"></a>
                    <a name="//apple_ref/swift/Method/markerStringOf(_:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:20LYConvenienceKitTest36LYMutableAttributedStringConveniencePAASo09NSMutableeF0CRbzrlE06markerF2OfyxAA18LYMixtureAttributeVF">markerStringOf(_:<wbr>)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>标记第一个子串</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@discardableResult</span>
<span class="kd">public</span> <span class="kd">func</span> <span class="nf">markerStringOf</span><span class="p">(</span><span class="n">_</span> <span class="nv">mixtureAttribute</span><span class="p">:</span> <span class="kt"><a href="../Structs/LYMixtureAttribute.html">LYMixtureAttribute</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:20LYConvenienceKitTest36LYMutableAttributedStringConveniencePAASo09NSMutableeF0CRbzrlE09markerAllF2OfyxAA18LYMixtureAttributeVF"></a>
                    <a name="//apple_ref/swift/Method/markerAllStringOf(_:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:20LYConvenienceKitTest36LYMutableAttributedStringConveniencePAASo09NSMutableeF0CRbzrlE09markerAllF2OfyxAA18LYMixtureAttributeVF">markerAllStringOf(_:<wbr>)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>标记所有子串(一般用于搜索时标记所有搜索关键字)</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@discardableResult</span>
<span class="kd">public</span> <span class="kd">func</span> <span class="nf">markerAllStringOf</span><span class="p">(</span><span class="n">_</span> <span class="nv">mixtureAttribute</span><span class="p">:</span> <span class="kt"><a href="../Structs/LYMixtureAttribute.html">LYMixtureAttribute</a></span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:20LYConvenienceKitTest36LYMutableAttributedStringConveniencePAASo09NSMutableeF0CRbzrlE014ly_calculationeF4Size10attributed4size7optionsSo6CGSizeVSo012NSAttributedF0C_AKSo22NSStringDrawingOptionsVtF"></a>
                    <a name="//apple_ref/swift/Method/ly_calculationAttributedStringSize(attributed:size:options:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:20LYConvenienceKitTest36LYMutableAttributedStringConveniencePAASo09NSMutableeF0CRbzrlE014ly_calculationeF4Size10attributed4size7optionsSo6CGSizeVSo012NSAttributedF0C_AKSo22NSStringDrawingOptionsVtF">ly_calculationAttributedStringSize(attributed:<wbr>size:<wbr>options:<wbr>)</a>
                    </code>
                      <span class="declaration-note">
                        Extension method
                      </span>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>计算AttributedString的size</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">ly_calculationAttributedStringSize</span><span class="p">(</span><span class="nv">attributed</span><span class="p">:</span> <span class="kt">NSAttributedString</span><span class="p">,</span> <span class="nv">size</span><span class="p">:</span> <span class="kt">CGSize</span><span class="p">,</span> <span class="nv">options</span><span class="p">:</span> <span class="kt">NSStringDrawingOptions</span> <span class="o">=</span> <span class="o">.</span><span class="n">usesLineFragmentOrigin</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">CGSize</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2021 <a class="link" href="https://github.com/liuyik/LYConvenienceKit.git" target="_blank" rel="external noopener">liuyik</a>. All rights reserved. (Last updated: 2021-11-18)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.1</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</html>
